home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb7.arc
/
RDIBMKBD.INC
< prev
next >
Wrap
Text File
|
1985-02-03
|
2KB
|
46 lines
(*******************************************************************)
(* this procedure reads the IBM keyboard. Cursor keys are *)
(* returned as control keys. Extended function keys are *)
(* returned as ASCII chars <131-140> The extra escape character *)
(* is eliminated. *)
(* REMEMBER: The USER INTERUPT COMPILER DIRECTIVE MUST BE *)
(* PASSIVE ($U-) FOR THIS ROUTINE TO WORK. *)
(*******************************************************************)
procedure ReadIBMch(var ch: char);
var ech: char;
begin { ReadIBMch }
{$U-}
ch := #00;
Read(kbd,ch);
if (ch = ^[) and KeyPressed then
begin
Read(kbd,ech); ch := #00;
case Ord(ech) of
15 : ch := ^O; { BACK TAB }
59 : ch := #131;{ PF 1 (HELP) KEY }
60 : ch := #132;{ PF 2 }
61 : ch := #133;{ PF 3 }
62 : ch := #134;{ PF 4 }
63 : ch := #135;{ PF 5 }
64 : ch := #136;{ PF 6 }
65 : ch := #137;{ PF 7 }
66 : ch := #138;{ PF 8 }
67 : ch := #139;{ PF 9 }
68 : ch := #140;{ PF 10 }
72 : ch := ^E; { CURSOR UP }
73 : ch := ^W; { PAGE UP }
75 : ch := ^S; { CURSOR LEFT }
77 : ch := ^D; { CURSOR RIGHT }
79 : ch := ^F; { END }
80 : ch := ^X; { CURSOR DOWN }
81 : ch := ^Z; { PAGE DOWN }
82 : ch := ^U; { INSERT }
83 : ch := ^G; { DELETE }
else Write(^G); (* Sound Speaker *)
end; {case }
end;
{$U+}
end; { ReadIBMch }